while (1) 
{
	sei();
	
	if ((!status))
	{
	
		nmeaProcess();
		if(FixQuality=='1')
		{
		transmitString1("GPS fixed");
		cli();
		transmitByte1('T');
		transmitByte1('I');
		transmitByte1('M');
		transmitByte1('E');
		transmitByte1(' ');
		write_flash_string(GPSTime);
		_delay_ms(100);
		transmitByte1(' ');
		transmitByte1('L');
		transmitByte1('A');
		transmitByte1('T');
		transmitByte1(' ');
			write_flash_string(Lat);
			_delay_ms(100);
			transmitByte1(' ');
			write_flash(NS[0]);
			transmitByte1(' ');
		transmitByte1('L');
		transmitByte1('O');
		transmitByte1('N');
		transmitByte1('G');
		transmitByte1(' ');
			/*for (int i=0;i<10;i++)
			{write_flash(Long[i]);
			_delay_ms(200);
			}*/
			write_flash_string(Long);
			_delay_ms(100);
			transmitByte1(' ');
			write_flash(EW[0]);
			transmitByte1(' ');
			transmitByte1('A');
			transmitByte1('L');
			transmitByte1('T');
			transmitByte1(' ');
			/*for (int i=0;i<7;i++)
			{write_flash(Altitude[i]);
			_delay_ms(200);
			}*/
			write_flash_string(Altitude);
			_delay_ms(100);

			transmitByte1(' ');
			transmitByte1('D');
			transmitByte1('A');
			transmitByte1('T');
			transmitByte1('E');
			transmitByte1(' ');
			/*for (int i=0;i<6;i++)
			{write_flash(GPSDate[i]);
			_delay_ms(200);
			}*/
			write_flash_string(GPSTime);
			_delay_ms(100);
			
			}
			else
			{
			
			transmitByte1('X');
			transmitByte1(FixQuality);
			transmitString1(NMEAPacket);
			//cli();
			//write_flash_string(NMEAPacket);
			//sei();
			//write_flash_string(NMEAPacket);
			//cli();
			//_delay_ms(200);
			}
			
				/*

					uint16_t i; uint8_t k,l;
					if(page_counter==0x01)
					{
					for( i=0; i<=page_counter; i++)
					{
					Page_To_Buffer (i, 1);
					_delay_ms(200);
					uint16_t i; uint8_t k;
						for( i=0; i<527; i++)

						{
						k= Buffer_Read_Byte (1, i);
						_delay_ms(100);
						transmitByte1(k);
				*/		//}
}
}
//}
//}//

















